package com.moli.iov.admin.service.impl;

import com.moli.iov.admin.service.MonitorService;
import com.moli.iov.base.model.dto.req.QueryVehicleBaseListReqDto;
import com.moli.iov.base.model.dto.req.VehicleAttentionReqDto;
import com.moli.iov.base.model.dto.req.VehicleBaseReqDto;
import com.moli.iov.base.model.dto.req.VehicleGraphicsQueryListReqDto;
import com.moli.iov.base.remote.IVehicleAttentionRemoteService;
import com.moli.iov.base.remote.IVehicleBaseRemoteService;
import com.moli.iov.rest.RestResponse;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * The type Vehicle base service.
 *
 * @author whl
 * @date 2019-09-16 19:24:47
 */
@Service
public class MonitorServiceImpl  implements MonitorService {
  @Reference(group = "${service.group}", check = false)
  private IVehicleBaseRemoteService iVehicleBaseRemoteService;
  @Reference(group = "${service.group}", check = false)
  private IVehicleAttentionRemoteService attentionRemoteService;

  @Override
  public RestResponse listVehicleGraphicsQueryListRes(VehicleGraphicsQueryListReqDto reqDto)
  {
     return iVehicleBaseRemoteService.listVehicleGraphicsQueryListRes(reqDto);
  }

  @Override
  public RestResponse listVehicleQueryListRes(QueryVehicleBaseListReqDto reqDto) {
    return iVehicleBaseRemoteService.listVehicleQueryListRes(reqDto);
  }

  @Override
  public RestResponse saveVehicleBase(VehicleBaseReqDto dto) {
    return iVehicleBaseRemoteService.saveVehicleBase(dto);
  }

  @Override
  public RestResponse updateVehicleBase(VehicleBaseReqDto dto) {
    return iVehicleBaseRemoteService.updateVehicleBase(dto);
  }

  @Override
  public RestResponse saveVehicleAttention(VehicleAttentionReqDto dto) {
    /**
     * 批量添加
     */
    return attentionRemoteService.saveBatchVehicleAttention( dto);
  }
}
